const formatTime = date => {
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()
  const hour = date.getHours()
  const minute = date.getMinutes()
  const second = date.getSeconds()
  return year + '年' + month + '月' + day + '日' + ' ' + hour + ':' + minute + ':' +second
}
const formatDate = date => {
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()
  return year + '年' + month + '月' + day + '日'
}
const formatTime2 = date => {
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()
  const hour = date.getHours()
  const minute = date.getMinutes()
  const second = date.getSeconds()
  return year + '/' + month + '/' + day + ' ' + hour + ':' + minute + ':' +second
}
const formatTime3 = date => {
  const month = date.getMonth() + 1
  const day = date.getDate()
  const year = date.getFullYear()
  return year + '/'+ month + '/' + day 
}
module.exports = {
  formatTime: formatTime,
  formatDate: formatDate,
  formatTime2: formatTime2,
  formatTime3: formatTime3
}